public class Test {
    public static void main
            (String[] args) {
        //A a0 = new A();
        //A a1 = new B();
        A a2 = new C();
    }
}
class A {
    public int a = 0;
    public A() {
        this.a = 1;
        System.out.println("A");
    }
}
class B extends A {
    public int b = 0;
    public B() {
        this.b = 2;
        System.out.println("B");
    }
}
class C extends B {
    public int c = 0;

    public C() {
        this.c = 3;
        System.out.println(a+b+c);
        System.out.println("C");
    }

}


